﻿package org.molamil.acto.pages.masters {	import org.molamil.acto.core.events.ActoEvent;	import org.molamil.acto.pages.PagesEvent;	import flash.display.DisplayObject;	import flash.utils.getDefinitionByName;	/**	 * XXX: Document.	 * 	 * @author Jorge Hernandez	 */	public class Definition extends AbstractMaster {						// PROPERTIES				protected var displayObject:DisplayObject;						// PROTECTED METHODS				protected override function doDisplay():void {						var displayObjectClass:Class = getDefinitionByName(context.target) as Class;
			displayObject = new displayObjectClass();			displayObject.name = context.id;			_container.addChild(displayObject);			_target = displayObject;						var pagesEvent:PagesEvent = new PagesEvent(ActoEvent.TARGET_CREATED, false, false, null, 													   _context, _request, _session, _target);			dispatchEvent(pagesEvent);						init();					}		protected override function doDestroy():void {			if (displayObject != null && displayObject.parent != null)				displayObject.parent.removeChild(displayObject);			displayObject = null;		}									}	}